<script setup>
import router from '@/router'
import { HOME_URL } from '@/config'
import { useRoute, useRouter } from 'vue-router'

const $route = useRoute()
const $router = useRouter()

const back = () => {
  $router.push({ path: HOME_URL })
}
</script>

<template>
  <a-result
    class="result"
    status="404"
    subtitle="抱歉，您访问的页面不存在或已失效"
  >
    <template #extra>
      <a-space size="medium">
        <a-button @click="router.replace(HOME_URL)" type="primary"
          >返回首页</a-button
        >
      </a-space>
    </template>
  </a-result>
</template>

<style scoped>
.result {
  height: 100vh;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}
</style>
